<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<HTML>
<HEAD>

  <TITLE>Advanced Programming in the UNIX Environment</TITLE>
  <STYLE type="text/css">
  body {
  background-color: #FFFFFf;
  }
  </STYLE>
  <STYLE type="text/css">
  li.c1 {list-style: none}
  </STYLE>
</HEAD>

<BODY>
  <TABLE border="1" align="center" cellpadding="15">
    <TR>
      <TD valign="top">
        <H2>Advanced Programming in the UNIX Environment</H2>

        <H3>Using <tt>git(1)</tt></H3>

        <H4>Summary</H4>
	<p>
        Learning to use a code revision system and collaborating with
        others is an important aspect of programming.  <a
        href="http://git-scm.com/">Git</a> is a popular free and open
        source distributed version control system and well worth knowing
        at least the fundamental of.
        </p>
        <p>
        Note: <tt>git(1)</tt> can be used without and independent of <a
        href="https://github.com/">GitHub</a>!  In this class, we will use
        <tt>git(1)</tt> for your <a href="course-notes.html">course notes</a>,
	as well as for your midterm-, group-, and final projects.
        </p>
        <p>
	You can create a repository on any Unix system you have access to,
	or even use a public repository such as on GitHub.
        <h4>Shared repositories</h4>
	<p>
	For your group project, you will need to use a
	shared repository for your team.  One way to
	do this would be to use a public hosting
	service, such as GitHub or GitLab; another way
	would be to keep the repository on e.g.
	<tt>linux-lab.cs.stevens-tech.edu</tt> and
	allow local access by way of suitable unix
	group permissions; a third way might be for
	one of you to host the repository on your own
	server and grant your team members access
	there.
	</p>
        <h4>Working with git</h4>
        <p>
        You should make it a habit to begin your working session by
        updating your copy of the repository and ending it by committing
        your changes.  If you are ready to push your changes, you would
	then push them to the repository:
        <blockquote><tt><pre>$ cd group1
$ git pull
$ $EDITOR notes
[edit]
$ git commit
$ git push</pre></tt></blockquote>
        </p>
        <p>
        Please <em>always</em> write a <em>meaningful</em> commit message.
        See these links for why/how:
        <ul>
          <li><a href="http://www.slideshare.net/TarinGamberini/commit-messages-goodpractices">Commit messages - Good practices</a></li>
          <li><a href="http://robots.thoughtbot.com/5-useful-tips-for-a-better-commit-message">5 Useful Tips For A Better Commit Message</a></li>
          <li><a href="http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html">A Note About Git Commit Messages</a></li>
        </ul>
        </p>
        <hr>
        [<a href="index.html">Course Website</a>]
</BODY>
</HTML>
